-- GENERATED SPELL FOR [Putridus Trickster] --


function spell0_11791(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(15657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11791', 626, 1)
end

function spell1_11791(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_11791', 607, 1)
end

function Sorts_11791(pUnit, Event)
local choix_sorts_11791 = math.random(0, 1)
if choix_sorts_11791 == 0 then
pUnit:RegisterEvent('spell0_11791', 1, 1)
end
if choix_sorts_11791 == 1 then
pUnit:RegisterEvent('spell1_11791', 1, 1)
end
end

function mob11791_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11791', math.random(1500, 3000), 1)
end

function mob11791_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11791_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11791_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11791, 1, 'mob11791_Action')
RegisterUnitEvent(11791, 2, 'mob11791_Leave')
RegisterUnitEvent(11791, 3, 'mob11791_Kill')
RegisterUnitEvent(11791, 4, 'mob11791_Die')
